/**
 * Created by limeng on 16/9/1.
 */
indexApp.controller("ArticleDetailCtrl", function ($scope, $http, $routeParams) {
    $scope.article = {};
    $scope.articleId = $routeParams.articleId;

    $http.get("/article/"+$scope.articleId).success(function (data) {
        if (data.state == true) {
            $scope.article = data.article;
            var contentElem = document.getElementById("articleContent");
            contentElem.innerHTML = $scope.article.content;
            contentElem.style.padding = 15;
        }
    });
});